3.3.95 \(\int \cosh ^2(c+d x) (a+b \sinh ^2(c+d x))^2 \, dx\) [295]

3.3.95.1 Optimal result
3.3.95.2 Mathematica [A] (verified)
3.3.95.3 Rubi [A] (verified)
3.3.95.4 Maple [A] (verified)
3.3.95.5 Fricas [A] (verification not implemented)
3.3.95.6 Sympy [B] (verification not implemented)
3.3.95.7 Maxima [A] (verification not implemented)
3.3.95.8 Giac [A] (verification not implemented)
3.3.95.9 Mupad [B] (verification not implemented)

3.3.95.1 Optimal result

Integrand size = 23, antiderivative size = 119 \[ \int \cosh ^2(c+d x) \left (a+b \sinh ^2(c+d x)\right )^2 \, dx=\frac {1}{16} \left (8 a^2-4 a b+b^2\right ) x+\frac {\left (8 a^2-4 a b+b^2\right ) \cosh (c+d x) \sinh (c+d x)}{16 d}+\frac {(8 a-3 b) b \cosh ^3(c+d x) \sinh (c+d x)}{24 d}+\frac {b \cosh ^5(c+d x) \sinh (c+d x) \left (a-(a-b) \tanh ^2(c+d x)\right )}{6 d} \]

output
1/16*(8*a^2-4*a*b+b^2)*x+1/16*(8*a^2-4*a*b+b^2)*cosh(d*x+c)*sinh(d*x+c)/d+ 
1/24*(8*a-3*b)*b*cosh(d*x+c)^3*sinh(d*x+c)/d+1/6*b*cosh(d*x+c)^5*sinh(d*x+ 
c)*(a-(a-b)*tanh(d*x+c)^2)/d
 
3.3.95.2 Mathematica [A] (verified)

Time = 1.61 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.66 \[ \int \cosh ^2(c+d x) \left (a+b \sinh ^2(c+d x)\right )^2 \, dx=\frac {12 \left (8 a^2-4 a b+b^2\right ) (c+d x)+3 \left (16 a^2-b^2\right ) \sinh (2 (c+d x))+3 (4 a-b) b \sinh (4 (c+d x))+b^2 \sinh (6 (c+d x))}{192 d} \]

input
Integrate[Cosh[c + d*x]^2*(a + b*Sinh[c + d*x]^2)^2,x]
 
output
(12*(8*a^2 - 4*a*b + b^2)*(c + d*x) + 3*(16*a^2 - b^2)*Sinh[2*(c + d*x)] + 
 3*(4*a - b)*b*Sinh[4*(c + d*x)] + b^2*Sinh[6*(c + d*x)])/(192*d)
 
3.3.95.3 Rubi [A] (verified)

Time = 0.33 (sec) , antiderivative size = 137, normalized size of antiderivative = 1.15, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {3042, 3670, 315, 25, 298, 215, 219}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \cosh ^2(c+d x) \left (a+b \sinh ^2(c+d x)\right )^2 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \cos (i c+i d x)^2 \left (a-b \sin (i c+i d x)^2\right )^2dx\)

\(\Big \downarrow \) 3670

\(\displaystyle \frac {\int \frac {\left (a-(a-b) \tanh ^2(c+d x)\right )^2}{\left (1-\tanh ^2(c+d x)\right )^4}d\tanh (c+d x)}{d}\)

\(\Big \downarrow \) 315

\(\displaystyle \frac {\frac {b \tanh (c+d x) \left (a-(a-b) \tanh ^2(c+d x)\right )}{6 \left (1-\tanh ^2(c+d x)\right )^3}-\frac {1}{6} \int -\frac {a (6 a-b)-3 (a-b) (2 a-b) \tanh ^2(c+d x)}{\left (1-\tanh ^2(c+d x)\right )^3}d\tanh (c+d x)}{d}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\frac {1}{6} \int \frac {a (6 a-b)-3 (a-b) (2 a-b) \tanh ^2(c+d x)}{\left (1-\tanh ^2(c+d x)\right )^3}d\tanh (c+d x)+\frac {b \tanh (c+d x) \left (a-(a-b) \tanh ^2(c+d x)\right )}{6 \left (1-\tanh ^2(c+d x)\right )^3}}{d}\)

\(\Big \downarrow \) 298

\(\displaystyle \frac {\frac {1}{6} \left (\frac {3}{4} \left (8 a^2-4 a b+b^2\right ) \int \frac {1}{\left (1-\tanh ^2(c+d x)\right )^2}d\tanh (c+d x)+\frac {b (8 a-3 b) \tanh (c+d x)}{4 \left (1-\tanh ^2(c+d x)\right )^2}\right )+\frac {b \tanh (c+d x) \left (a-(a-b) \tanh ^2(c+d x)\right )}{6 \left (1-\tanh ^2(c+d x)\right )^3}}{d}\)

\(\Big \downarrow \) 215

\(\displaystyle \frac {\frac {1}{6} \left (\frac {3}{4} \left (8 a^2-4 a b+b^2\right ) \left (\frac {1}{2} \int \frac {1}{1-\tanh ^2(c+d x)}d\tanh (c+d x)+\frac {\tanh (c+d x)}{2 \left (1-\tanh ^2(c+d x)\right )}\right )+\frac {b (8 a-3 b) \tanh (c+d x)}{4 \left (1-\tanh ^2(c+d x)\right )^2}\right )+\frac {b \tanh (c+d x) \left (a-(a-b) \tanh ^2(c+d x)\right )}{6 \left (1-\tanh ^2(c+d x)\right )^3}}{d}\)

\(\Big \downarrow \) 219

\(\displaystyle \frac {\frac {1}{6} \left (\frac {3}{4} \left (8 a^2-4 a b+b^2\right ) \left (\frac {1}{2} \text {arctanh}(\tanh (c+d x))+\frac {\tanh (c+d x)}{2 \left (1-\tanh ^2(c+d x)\right )}\right )+\frac {b (8 a-3 b) \tanh (c+d x)}{4 \left (1-\tanh ^2(c+d x)\right )^2}\right )+\frac {b \tanh (c+d x) \left (a-(a-b) \tanh ^2(c+d x)\right )}{6 \left (1-\tanh ^2(c+d x)\right )^3}}{d}\)

input
Int[Cosh[c + d*x]^2*(a + b*Sinh[c + d*x]^2)^2,x]
 
output
((b*Tanh[c + d*x]*(a - (a - b)*Tanh[c + d*x]^2))/(6*(1 - Tanh[c + d*x]^2)^ 
3) + (((8*a - 3*b)*b*Tanh[c + d*x])/(4*(1 - Tanh[c + d*x]^2)^2) + (3*(8*a^ 
2 - 4*a*b + b^2)*(ArcTanh[Tanh[c + d*x]]/2 + Tanh[c + d*x]/(2*(1 - Tanh[c 
+ d*x]^2))))/4)/6)/d
 

3.3.95.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 215
Int[((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(-x)*((a + b*x^2)^(p + 1) 
/(2*a*(p + 1))), x] + Simp[(2*p + 3)/(2*a*(p + 1))   Int[(a + b*x^2)^(p + 1 
), x], x] /; FreeQ[{a, b}, x] && LtQ[p, -1] && (IntegerQ[4*p] || IntegerQ[6 
*p])
 

rule 219
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* 
ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt 
Q[a, 0] || LtQ[b, 0])
 

rule 298
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2), x_Symbol] :> Simp[(-( 
b*c - a*d))*x*((a + b*x^2)^(p + 1)/(2*a*b*(p + 1))), x] - Simp[(a*d - b*c*( 
2*p + 3))/(2*a*b*(p + 1))   Int[(a + b*x^2)^(p + 1), x], x] /; FreeQ[{a, b, 
 c, d, p}, x] && NeQ[b*c - a*d, 0] && (LtQ[p, -1] || ILtQ[1/2 + p, 0])
 

rule 315
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Sim 
p[(a*d - c*b)*x*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q - 1)/(2*a*b*(p + 1))), 
x] - Simp[1/(2*a*b*(p + 1))   Int[(a + b*x^2)^(p + 1)*(c + d*x^2)^(q - 2)*S 
imp[c*(a*d - c*b*(2*p + 3)) + d*(a*d*(2*(q - 1) + 1) - b*c*(2*(p + q) + 1)) 
*x^2, x], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && LtQ[p, - 
1] && GtQ[q, 1] && IntBinomialQ[a, b, c, d, 2, p, q, x]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3670
Int[cos[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^( 
p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[ff/f   Su 
bst[Int[(a + (a + b)*ff^2*x^2)^p/(1 + ff^2*x^2)^(m/2 + p + 1), x], x, Tan[e 
 + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[m/2] && IntegerQ[p]
 
3.3.95.4 Maple [A] (verified)

Time = 95.40 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.13

method result size
derivativedivides \(\frac {a^{2} \left (\frac {\sinh \left (d x +c \right ) \cosh \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+2 a b \left (\frac {\sinh \left (d x +c \right ) \cosh \left (d x +c \right )^{3}}{4}-\frac {\sinh \left (d x +c \right ) \cosh \left (d x +c \right )}{8}-\frac {d x}{8}-\frac {c}{8}\right )+b^{2} \left (\frac {\sinh \left (d x +c \right )^{3} \cosh \left (d x +c \right )^{3}}{6}-\frac {\sinh \left (d x +c \right ) \cosh \left (d x +c \right )^{3}}{8}+\frac {\sinh \left (d x +c \right ) \cosh \left (d x +c \right )}{16}+\frac {d x}{16}+\frac {c}{16}\right )}{d}\) \(134\)
default \(\frac {a^{2} \left (\frac {\sinh \left (d x +c \right ) \cosh \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+2 a b \left (\frac {\sinh \left (d x +c \right ) \cosh \left (d x +c \right )^{3}}{4}-\frac {\sinh \left (d x +c \right ) \cosh \left (d x +c \right )}{8}-\frac {d x}{8}-\frac {c}{8}\right )+b^{2} \left (\frac {\sinh \left (d x +c \right )^{3} \cosh \left (d x +c \right )^{3}}{6}-\frac {\sinh \left (d x +c \right ) \cosh \left (d x +c \right )^{3}}{8}+\frac {\sinh \left (d x +c \right ) \cosh \left (d x +c \right )}{16}+\frac {d x}{16}+\frac {c}{16}\right )}{d}\) \(134\)
risch \(\frac {a^{2} x}{2}-\frac {a b x}{4}+\frac {b^{2} x}{16}+\frac {b^{2} {\mathrm e}^{6 d x +6 c}}{384 d}+\frac {{\mathrm e}^{4 d x +4 c} a b}{32 d}-\frac {{\mathrm e}^{4 d x +4 c} b^{2}}{128 d}+\frac {{\mathrm e}^{2 d x +2 c} a^{2}}{8 d}-\frac {{\mathrm e}^{2 d x +2 c} b^{2}}{128 d}-\frac {{\mathrm e}^{-2 d x -2 c} a^{2}}{8 d}+\frac {{\mathrm e}^{-2 d x -2 c} b^{2}}{128 d}-\frac {{\mathrm e}^{-4 d x -4 c} a b}{32 d}+\frac {{\mathrm e}^{-4 d x -4 c} b^{2}}{128 d}-\frac {b^{2} {\mathrm e}^{-6 d x -6 c}}{384 d}\) \(187\)

input
int(cosh(d*x+c)^2*(a+b*sinh(d*x+c)^2)^2,x,method=_RETURNVERBOSE)
 
output
1/d*(a^2*(1/2*sinh(d*x+c)*cosh(d*x+c)+1/2*d*x+1/2*c)+2*a*b*(1/4*sinh(d*x+c 
)*cosh(d*x+c)^3-1/8*sinh(d*x+c)*cosh(d*x+c)-1/8*d*x-1/8*c)+b^2*(1/6*sinh(d 
*x+c)^3*cosh(d*x+c)^3-1/8*sinh(d*x+c)*cosh(d*x+c)^3+1/16*sinh(d*x+c)*cosh( 
d*x+c)+1/16*d*x+1/16*c))
 
3.3.95.5 Fricas [A] (verification not implemented)

Time = 0.26 (sec) , antiderivative size = 143, normalized size of antiderivative = 1.20 \[ \int \cosh ^2(c+d x) \left (a+b \sinh ^2(c+d x)\right )^2 \, dx=\frac {3 \, b^{2} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{5} + 2 \, {\left (5 \, b^{2} \cosh \left (d x + c\right )^{3} + 3 \, {\left (4 \, a b - b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{3} + 6 \, {\left (8 \, a^{2} - 4 \, a b + b^{2}\right )} d x + 3 \, {\left (b^{2} \cosh \left (d x + c\right )^{5} + 2 \, {\left (4 \, a b - b^{2}\right )} \cosh \left (d x + c\right )^{3} + {\left (16 \, a^{2} - b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )}{96 \, d} \]

input
integrate(cosh(d*x+c)^2*(a+b*sinh(d*x+c)^2)^2,x, algorithm="fricas")
 
output
1/96*(3*b^2*cosh(d*x + c)*sinh(d*x + c)^5 + 2*(5*b^2*cosh(d*x + c)^3 + 3*( 
4*a*b - b^2)*cosh(d*x + c))*sinh(d*x + c)^3 + 6*(8*a^2 - 4*a*b + b^2)*d*x 
+ 3*(b^2*cosh(d*x + c)^5 + 2*(4*a*b - b^2)*cosh(d*x + c)^3 + (16*a^2 - b^2 
)*cosh(d*x + c))*sinh(d*x + c))/d
 
3.3.95.6 Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 314 vs. \(2 (105) = 210\).

Time = 0.37 (sec) , antiderivative size = 314, normalized size of antiderivative = 2.64 \[ \int \cosh ^2(c+d x) \left (a+b \sinh ^2(c+d x)\right )^2 \, dx=\begin {cases} - \frac {a^{2} x \sinh ^{2}{\left (c + d x \right )}}{2} + \frac {a^{2} x \cosh ^{2}{\left (c + d x \right )}}{2} + \frac {a^{2} \sinh {\left (c + d x \right )} \cosh {\left (c + d x \right )}}{2 d} - \frac {a b x \sinh ^{4}{\left (c + d x \right )}}{4} + \frac {a b x \sinh ^{2}{\left (c + d x \right )} \cosh ^{2}{\left (c + d x \right )}}{2} - \frac {a b x \cosh ^{4}{\left (c + d x \right )}}{4} + \frac {a b \sinh ^{3}{\left (c + d x \right )} \cosh {\left (c + d x \right )}}{4 d} + \frac {a b \sinh {\left (c + d x \right )} \cosh ^{3}{\left (c + d x \right )}}{4 d} - \frac {b^{2} x \sinh ^{6}{\left (c + d x \right )}}{16} + \frac {3 b^{2} x \sinh ^{4}{\left (c + d x \right )} \cosh ^{2}{\left (c + d x \right )}}{16} - \frac {3 b^{2} x \sinh ^{2}{\left (c + d x \right )} \cosh ^{4}{\left (c + d x \right )}}{16} + \frac {b^{2} x \cosh ^{6}{\left (c + d x \right )}}{16} + \frac {b^{2} \sinh ^{5}{\left (c + d x \right )} \cosh {\left (c + d x \right )}}{16 d} + \frac {b^{2} \sinh ^{3}{\left (c + d x \right )} \cosh ^{3}{\left (c + d x \right )}}{6 d} - \frac {b^{2} \sinh {\left (c + d x \right )} \cosh ^{5}{\left (c + d x \right )}}{16 d} & \text {for}\: d \neq 0 \\x \left (a + b \sinh ^{2}{\left (c \right )}\right )^{2} \cosh ^{2}{\left (c \right )} & \text {otherwise} \end {cases} \]

input
integrate(cosh(d*x+c)**2*(a+b*sinh(d*x+c)**2)**2,x)
 
output
Piecewise((-a**2*x*sinh(c + d*x)**2/2 + a**2*x*cosh(c + d*x)**2/2 + a**2*s 
inh(c + d*x)*cosh(c + d*x)/(2*d) - a*b*x*sinh(c + d*x)**4/4 + a*b*x*sinh(c 
 + d*x)**2*cosh(c + d*x)**2/2 - a*b*x*cosh(c + d*x)**4/4 + a*b*sinh(c + d* 
x)**3*cosh(c + d*x)/(4*d) + a*b*sinh(c + d*x)*cosh(c + d*x)**3/(4*d) - b** 
2*x*sinh(c + d*x)**6/16 + 3*b**2*x*sinh(c + d*x)**4*cosh(c + d*x)**2/16 - 
3*b**2*x*sinh(c + d*x)**2*cosh(c + d*x)**4/16 + b**2*x*cosh(c + d*x)**6/16 
 + b**2*sinh(c + d*x)**5*cosh(c + d*x)/(16*d) + b**2*sinh(c + d*x)**3*cosh 
(c + d*x)**3/(6*d) - b**2*sinh(c + d*x)*cosh(c + d*x)**5/(16*d), Ne(d, 0)) 
, (x*(a + b*sinh(c)**2)**2*cosh(c)**2, True))
 
3.3.95.7 Maxima [A] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 171, normalized size of antiderivative = 1.44 \[ \int \cosh ^2(c+d x) \left (a+b \sinh ^2(c+d x)\right )^2 \, dx=\frac {1}{8} \, a^{2} {\left (4 \, x + \frac {e^{\left (2 \, d x + 2 \, c\right )}}{d} - \frac {e^{\left (-2 \, d x - 2 \, c\right )}}{d}\right )} - \frac {1}{384} \, b^{2} {\left (\frac {{\left (3 \, e^{\left (-2 \, d x - 2 \, c\right )} + 3 \, e^{\left (-4 \, d x - 4 \, c\right )} - 1\right )} e^{\left (6 \, d x + 6 \, c\right )}}{d} - \frac {24 \, {\left (d x + c\right )}}{d} - \frac {3 \, e^{\left (-2 \, d x - 2 \, c\right )} + 3 \, e^{\left (-4 \, d x - 4 \, c\right )} - e^{\left (-6 \, d x - 6 \, c\right )}}{d}\right )} - \frac {1}{32} \, a b {\left (\frac {8 \, {\left (d x + c\right )}}{d} - \frac {e^{\left (4 \, d x + 4 \, c\right )}}{d} + \frac {e^{\left (-4 \, d x - 4 \, c\right )}}{d}\right )} \]

input
integrate(cosh(d*x+c)^2*(a+b*sinh(d*x+c)^2)^2,x, algorithm="maxima")
 
output
1/8*a^2*(4*x + e^(2*d*x + 2*c)/d - e^(-2*d*x - 2*c)/d) - 1/384*b^2*((3*e^( 
-2*d*x - 2*c) + 3*e^(-4*d*x - 4*c) - 1)*e^(6*d*x + 6*c)/d - 24*(d*x + c)/d 
 - (3*e^(-2*d*x - 2*c) + 3*e^(-4*d*x - 4*c) - e^(-6*d*x - 6*c))/d) - 1/32* 
a*b*(8*(d*x + c)/d - e^(4*d*x + 4*c)/d + e^(-4*d*x - 4*c)/d)
 
3.3.95.8 Giac [A] (verification not implemented)

Time = 0.28 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.25 \[ \int \cosh ^2(c+d x) \left (a+b \sinh ^2(c+d x)\right )^2 \, dx=\frac {1}{16} \, {\left (8 \, a^{2} - 4 \, a b + b^{2}\right )} x + \frac {b^{2} e^{\left (6 \, d x + 6 \, c\right )}}{384 \, d} - \frac {b^{2} e^{\left (-6 \, d x - 6 \, c\right )}}{384 \, d} + \frac {{\left (4 \, a b - b^{2}\right )} e^{\left (4 \, d x + 4 \, c\right )}}{128 \, d} + \frac {{\left (16 \, a^{2} - b^{2}\right )} e^{\left (2 \, d x + 2 \, c\right )}}{128 \, d} - \frac {{\left (16 \, a^{2} - b^{2}\right )} e^{\left (-2 \, d x - 2 \, c\right )}}{128 \, d} - \frac {{\left (4 \, a b - b^{2}\right )} e^{\left (-4 \, d x - 4 \, c\right )}}{128 \, d} \]

input
integrate(cosh(d*x+c)^2*(a+b*sinh(d*x+c)^2)^2,x, algorithm="giac")
 
output
1/16*(8*a^2 - 4*a*b + b^2)*x + 1/384*b^2*e^(6*d*x + 6*c)/d - 1/384*b^2*e^( 
-6*d*x - 6*c)/d + 1/128*(4*a*b - b^2)*e^(4*d*x + 4*c)/d + 1/128*(16*a^2 - 
b^2)*e^(2*d*x + 2*c)/d - 1/128*(16*a^2 - b^2)*e^(-2*d*x - 2*c)/d - 1/128*( 
4*a*b - b^2)*e^(-4*d*x - 4*c)/d
 
3.3.95.9 Mupad [B] (verification not implemented)

Time = 0.22 (sec) , antiderivative size = 95, normalized size of antiderivative = 0.80 \[ \int \cosh ^2(c+d x) \left (a+b \sinh ^2(c+d x)\right )^2 \, dx=\frac {12\,a^2\,\mathrm {sinh}\left (2\,c+2\,d\,x\right )-\frac {3\,b^2\,\mathrm {sinh}\left (2\,c+2\,d\,x\right )}{4}-\frac {3\,b^2\,\mathrm {sinh}\left (4\,c+4\,d\,x\right )}{4}+\frac {b^2\,\mathrm {sinh}\left (6\,c+6\,d\,x\right )}{4}+3\,a\,b\,\mathrm {sinh}\left (4\,c+4\,d\,x\right )+24\,a^2\,d\,x+3\,b^2\,d\,x-12\,a\,b\,d\,x}{48\,d} \]

input
int(cosh(c + d*x)^2*(a + b*sinh(c + d*x)^2)^2,x)
 
output
(12*a^2*sinh(2*c + 2*d*x) - (3*b^2*sinh(2*c + 2*d*x))/4 - (3*b^2*sinh(4*c 
+ 4*d*x))/4 + (b^2*sinh(6*c + 6*d*x))/4 + 3*a*b*sinh(4*c + 4*d*x) + 24*a^2 
*d*x + 3*b^2*d*x - 12*a*b*d*x)/(48*d)